﻿namespace BCL.BaseLib.Basics
{
    /// <summary>
    /// 主界面菜单项关联控件
    /// </summary>

    public interface IFunctionControl 
    {

        /// <summary>
        /// 需要重新加载数据时调用,如有必要,子类需重写此方法
        /// </summary>
        /// <param name="data"></param>
        void ReloadData(object data);

        /// <summary>
        /// 控件设置项,后期可能还会增加
        /// </summary>
        FunctionControlSetting Setting { get; set; }

        /// <summary>
        /// 切换语言
        /// </summary>
        void LanguageBinding();
        FunctionEntity Function { get; set; }
    }

    public enum FunctionControlSetting
    {
        /// <summary>
        /// 以控件形式包含在父容器中
        /// </summary>
        UserControl = 1,

        /// <summary>
        /// 弹出独立的新窗体显示当前控件
        /// </summary>
        Show = 2,

        /// <summary>
        /// ShowDialog
        /// </summary>
        ShowDialog = 4,

        /// <summary>
        /// MDI子窗体
        /// </summary>
        MDIItem = 8,

        /// <summary>
        /// 缓存控件,在父控件关闭时不销毁控件
        /// </summary>
        Cache = 16,


    }

}
